package com.xuelang.pipeline.worker.app.deployment;

import com.xuelang.pipeline.worker.client.deployment.dto.DeployQueryDTO;
import io.kubernetes.client.openapi.models.V1DeploymentList;
import io.kubernetes.client.openapi.models.V1Scale;

import java.util.List;

/**
 * @author liuyuan.ly
 * @since 2024/8/8 16:36
 */
public interface DeploymentService {

    /**
     * 查询deployment列表
     *
     * @param queryDTO
     * @return V1NamespaceList
     */
    V1DeploymentList getDeploymentList(DeployQueryDTO queryDTO);

    /**
     * path 替换更新deployment
     *
     * @param queryDTO
     * @return
     */

    V1Scale patchDeployment(DeployQueryDTO queryDTO);

    /**
     * 通过查询部署单Label，获取有效的deployment
     * @param queryDTO
     * @return
     */
    List<String> listAvailableDeploymentName(DeployQueryDTO queryDTO);

}
